import request from "@/utils/request"

export interface UploadImage {
  /** 图片id */
  id: string
  /** 图片地址 */
  url: string
}

export const uploadImageAPI = (filePath: string) => {
  return request.upload<null, UploadImage>('/upload', {
    name: 'file', 
    filePath: filePath,
  })
}